$(function(){
	var dataurl=null;
	var clipArea = new bjj.PhotoClip("#clipArea",{
		width: 200,
		height: 300,
		file: "#file",
		view: "#view",
		ok: "#clipBtn",
		loadStart: function() {
			console.log("照片读取中");
		},
		loadComplete: function() {
			console.log("照片读取完成");
		},
		clipFinish: function(dataURL) {
			dataurl=dataURL;
		}
	});
	
	document.getElementById("file").addEventListener("change",function(){
		$("#alertBox").fadeIn(500);
	});
	$("#clipBtn").on("touchstart",function(){
		$("#alertBox").fadeOut(500);
		
	});
	
})